package com.xyzwps.navia.content;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RefreshScope
@RestController
public class TestController {

    @Autowired
    private AppProperties appProperties;

    @Value("${app.description}")
    private String description;

    @GetMapping("/description")
    public Map<String, Object> description() {
        return Map.of("description", description, "app", appProperties);
    }
}
